require 'graph.rb'

i = -1
inputFile = []
file = File.new(ARGV[0], "r")
gr = DrawGraph.new

while (line = file.gets)
	if i < 0
		nbSommets = line.chomp
	else
		inputFile[i] = line.chomp.split(" ")
		gr.add_path(inputFile[i][0].to_s, inputFile[i][1].to_s, inputFile[i][2].to_i)
	end
	i += 1
end
file.close

puts "Nom du fichier : " + ARGV[0].to_s
puts "Nombre de sommets : " + nbSommets.to_s
puts "Nombre d'arcs : " + inputFile.length.to_s

inputFile.length.times do |i|
	puts inputFile[i][0].to_s + " " + inputFile[i][1].to_s + " " + inputFile[i][2].to_s
end

gr.shortest_path("a")
